import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'
import LoginView from "@/views/LoginView";
import RegisterView from "@/views/RegisterView";
import UserView from "@/views/UserView";
import addfriend from "@/views/addfriend";
import friends from "@/views/friends";
import ChatView from "@/views/ChatView";

Vue.use(VueRouter)

const routes = [
    {
        path: '/',
        name: 'home',
        component: HomeView
    },
    {
        path: '/login',
        name: 'login',
        component: LoginView
    },
    {
        path: '/register',
        name: 'register',
        component: RegisterView
    },
    {
        path: '/Userinform',
        name: 'Userinform',
        component: UserView
    },
    {
        path: '/addfriend',
        name: 'addfriend',
        component: addfriend
    },
    {
        path: '/friends',
        name: 'friends',
        component: friends
    },
    {
        path: '/chating',
        name: 'chating',
        component: ChatView
    },

]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router
